package com.qi.sqlSession;

import com.qi.pojo.Configuration;
import com.qi.pojo.Mapper;

import java.sql.Connection;
import java.util.List;

/**
 * @author zjq
 * @version 1.0
 * @date 2021/12/5 17:17
 */
public class SimpleExecuter implements Executer {
    private Connection connection;

    @Override
    public <E> List<E> query(Configuration configuration, Mapper mapper, Object... param) throws Exception {
        //获取连接
        connection = configuration.getDataSource().getConnection();
        //获取sql select * from user where username=#{username}
        String sql = mapper.getSql();
        //解析sql： select * from user where username=#{username}

        return null;
    }
}
